package demo2_i;

public abstract class Test {
    //抽象方法
    //public abstract void draw();

    //向上转型，多态
    public static void drawMap(IShape iShape){
        iShape.draw();
    }

    public static void main(String[] args) {
        //接口(抽象类)不能实例化
        //IShape iShape = new IShape();
        //可以实例化子类具体对象
        IShape iShape1 = new Cycle();
        IShape iShape2 = new Rect();

        drawMap(iShape1);
        drawMap(iShape2);
    }
}
